UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bHfrNS2viSnyu/xVmTK4mkhwVMPJsVf3Zlsi/cjjESI='
WHERE
key_id = '85a360d4acb0f1ee8281eebce3fc2eb7438fa8b878dd03e01c73422d89be7625'
AND (
token = 'bHfrNS2viSnyu/xVmTK4mkhwVMPJsVf3Zlsi/cjjESI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)