UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0suVNGmsWDqMIxfVWOttB9a4NTthpaGIZdMET4pOGXc=' 
WHERE 
  key_id = '3b1e45c383036aad55d7373cfe39f6cd0b6f839aa9a8c825878e99d97ec1cf7e' 
  AND (
    token = '0suVNGmsWDqMIxfVWOttB9a4NTthpaGIZdMET4pOGXc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00063