UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3OHtt/CGVKszpZYUf+rJxQhFug2h7tMSqxKeNSSGRfY='
WHERE
key_id = '41c35d21f206712c9b304641bd95c90774f95ddc3394324d58f1aaba53d9edb1'
AND (
token = '3OHtt/CGVKszpZYUf+rJxQhFug2h7tMSqxKeNSSGRfY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)