UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'jc/ybDwwwRPdneEzVg9vibrWZR43g9PHwyhNnWjYpyQ='
WHERE
key_id = 'e2da3769f9e5a785e937ab950838fe54fe90f673810acb4de4c4dc24eb2871f7'
AND (
token = 'jc/ybDwwwRPdneEzVg9vibrWZR43g9PHwyhNnWjYpyQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)