UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '03J+AqvtVNQRq4bDyBP8WEs8dNKHyWuA5866Gl7qLSo=' 
WHERE 
  key_id = '9eaee15bcb115e093ed342e1f2f6d8a632b0416adaa131d97f12e463c82feed2' 
  AND (
    token = '03J+AqvtVNQRq4bDyBP8WEs8dNKHyWuA5866Gl7qLSo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00070