UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0RzdqZQeAzl4fbux6o+ogAQ1Kq+cxwskmQFao31fskA=' 
WHERE 
  key_id = '9c9f1bbef60c0ad9afb5017af0a744d5b8e0c31dd79e9c64e1dd8727438a8006' 
  AND (
    token = '0RzdqZQeAzl4fbux6o+ogAQ1Kq+cxwskmQFao31fskA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020