UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '1wfi7kxEbgz19r4etGybn1HQZFE5B/BQ8nwtyDjmNTU=' 
WHERE 
  key_id = '7dfc5edbbaf61d939fb788969ccda9ac1c6dc3e7d6f45981f46853a61565e51f' 
  AND (
    token = '1wfi7kxEbgz19r4etGybn1HQZFE5B/BQ8nwtyDjmNTU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00072