UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'j4Hmo/fIySLMwTqESHW3XcH4JEFuzVhcyhqjsrv3V2o='
WHERE
key_id = '362785df95d17b54f89e1a09e48865d68040b652da0bf9cd103611bec5f55f5c'
AND (
token = 'j4Hmo/fIySLMwTqESHW3XcH4JEFuzVhcyhqjsrv3V2o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)