UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xHVHawg44HsWeJJ+0Y0+54FNPAu9E/5CGCHYP50LWvA=' 
WHERE 
  key_id = '0b8ba8782f3ef89f3c33367d789c3eb6cd8dc5b06b653d691b8294e5c184c95b' 
  AND (
    token = 'xHVHawg44HsWeJJ+0Y0+54FNPAu9E/5CGCHYP50LWvA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036