UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'X+Yr6uGsMNBuZVnD3PSCnOTTFt2z7lZyWUrjY7FGe2c='
WHERE
key_id = '5c8bbb35cedf01256e5ac16cceb9969a5e6c17cdc8aa5f07572cdc09bf2ff539'
AND (
token = 'X+Yr6uGsMNBuZVnD3PSCnOTTFt2z7lZyWUrjY7FGe2c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)