UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'f0obembGSS7CnrrWijjOXgIX3KiwX59NNOhSHqmnfiI='
WHERE
key_id = '63ef5a9cf7c3c4d5b5b10da221d434a499ec609cd9520ee38f4928033ff6165b'
AND (
token = 'f0obembGSS7CnrrWijjOXgIX3KiwX59NNOhSHqmnfiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)