UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V3CfJBQlNyfIau/EDcMaqDTnSuqtIwrtEJRwkhZ4pD8='
WHERE
key_id = '75d38084c5487b49cab2035f0423261abfc1ffab5bca30d01abb9c9beef16052'
AND (
token = 'V3CfJBQlNyfIau/EDcMaqDTnSuqtIwrtEJRwkhZ4pD8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)