UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HnH1jX3EPDBqUY2tjujUd6nHUBF82sEN/E/r1gjkGXQ='
WHERE
key_id = '2280cc682717dfbe8d70dd2c10ea0c03d7f3572d95de712d41d19b2711592ac6'
AND (
token = 'HnH1jX3EPDBqUY2tjujUd6nHUBF82sEN/E/r1gjkGXQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)