UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5YXPE3F88zeZAHh6wHyMv/A0D//2AvhpAB38E2TGyDM='
WHERE
key_id = '0f758b602a429c0e315296751b15fa69085c4505bcee243f6763dc9cd899767b'
AND (
token = '5YXPE3F88zeZAHh6wHyMv/A0D//2AvhpAB38E2TGyDM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)