UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Drzqx+MpllSlkLhsyHLJAkUpzesAWyswcoTraUhVURg='
WHERE
key_id = '4065496aa4c69651117ff62ec5ef1500a1ca072f01cbe3706bbb054cbd48fe2b'
AND (
token = 'Drzqx+MpllSlkLhsyHLJAkUpzesAWyswcoTraUhVURg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)