UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2NgCP++VWumzsfBmn4Kg5lG6ZAv2xxmMvk9Igtr7pkY='
WHERE
key_id = '43148761f5bde173a06d0ed456878fcdd571f9881c251c67de05917929a90178'
AND (
token = '2NgCP++VWumzsfBmn4Kg5lG6ZAv2xxmMvk9Igtr7pkY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)