UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eabO+m5o749EL9HqKVOmr4+TwnCb+PNE+NvYfd8qU+I='
WHERE
key_id = '6eda17812953185316fe86c9b745008616de4cf88191f6b3131ac232284d23f4'
AND (
token = 'eabO+m5o749EL9HqKVOmr4+TwnCb+PNE+NvYfd8qU+I='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)