UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3q8SI06ZR+bnEVUwqa3aLmFpnBUciBdxlNQy1D8ySho=' 
WHERE 
  key_id = '72d5a0c1b68637be6255a67e29dc326160e41eada197f8485c7c546f7090b8e1' 
  AND (
    token = '3q8SI06ZR+bnEVUwqa3aLmFpnBUciBdxlNQy1D8ySho=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031