UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '7mqBJAVU0C1tMKMinJvWC1S1BGSGShU7nwFDB8hntzk=' 
WHERE 
  key_id = '0740b09ec6f030dbcc7d496ba4ba5199c21fd65663ed3443c0ac1579e0ba1d82' 
  AND (
    token = '7mqBJAVU0C1tMKMinJvWC1S1BGSGShU7nwFDB8hntzk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00067