UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IwElccqeTv8KK9FwZp74bvdoabyrYcLQ3BDglEncUjw='
WHERE
key_id = '2006ca503400f74aef8247174db64ee09e9de1b21a678715ab522b148e283df0'
AND (
token = 'IwElccqeTv8KK9FwZp74bvdoabyrYcLQ3BDglEncUjw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)