UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oxfuE71B7HCbfeBldx9V/kos2LlfUm/RNs+GnIA+XGM='
WHERE
key_id = '73e3624771ea5c0e7ab9762e71f4fc39f62c83b9cfbe6508bb3a3fc2d4d5e06c'
AND (
token = 'oxfuE71B7HCbfeBldx9V/kos2LlfUm/RNs+GnIA+XGM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)