UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ui3acbi/dBReeXEl669PeSNqCI4IKdPftfSJbqSqinU='
WHERE
key_id = 'b96c11b6118602c427670459575904a5c4ce233264a6f2b651de580a02224a60'
AND (
token = 'ui3acbi/dBReeXEl669PeSNqCI4IKdPftfSJbqSqinU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)