UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'nPa/KjRI6KEQUZFtE++4rsHlJixoTZ0qMihmBtui8iA=' 
WHERE 
  key_id = '191fa68ee1f6fb28b256b72576c3cd633b2b07e7b4c11574e8bcca2727a9c7e0' 
  AND (
    token = 'nPa/KjRI6KEQUZFtE++4rsHlJixoTZ0qMihmBtui8iA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054