UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'zFMT03qeRW0We7/GxEuiVpaSRG6nr6AQ3uLbFkpzIvQ=' 
WHERE 
  key_id = 'a28afa717f2d2d7e8e2426626e7d931cdee6bcff2ad50d9cf5e050a8a50f00c2' 
  AND (
    token = 'zFMT03qeRW0We7/GxEuiVpaSRG6nr6AQ3uLbFkpzIvQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020