UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'QhW1xJfMgoaBKV0PrAe1pRbOtoklMTnwZ9voVhHr4BM=' 
WHERE 
  key_id = '76c2cf6c6bcf3cd7d2601eac4169fbebbc02232236cd11edcc4c2353c1de74e4' 
  AND (
    token = 'QhW1xJfMgoaBKV0PrAe1pRbOtoklMTnwZ9voVhHr4BM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00021