UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JF1AFA5/HFyyKq87EzzLmo0v9ids0p5La+JfIvJC3uM=' 
WHERE 
  key_id = '7825f3a00ca1a96a8f7816d5baa65085f2fd0c7ce52ca6a4c4b2cedc0f8aae6f' 
  AND (
    token = 'JF1AFA5/HFyyKq87EzzLmo0v9ids0p5La+JfIvJC3uM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031