UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'sWYZamR8EIstWPgoYZl1FGYbiMdxKigBt1p1gK89BCQ=' 
WHERE 
  key_id = 'eb79afced7f0b92f56573962ef982758192271d0aba12dd33ed3f26178ef0968' 
  AND (
    token = 'sWYZamR8EIstWPgoYZl1FGYbiMdxKigBt1p1gK89BCQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023