UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'e8X8WqY/9IE//T9iex5FNJCA2JqLDfR3KDngXAlO+9g=' 
WHERE 
  key_id = 'bcb574b9b9c9f4176d5162e643cd22c7920fd1841877756147ddf30bb7a1c3d0' 
  AND (
    token = 'e8X8WqY/9IE//T9iex5FNJCA2JqLDfR3KDngXAlO+9g=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027