UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IHux+D5PUBCDi6n4y3DplqSTcUt6iUBM6mgcdGfzTv4=' 
WHERE 
  key_id = 'ca075bf5bbdffd6ccd2457118b7e68ac45fc922f5bfce070309bd9a035aaa763' 
  AND (
    token = 'IHux+D5PUBCDi6n4y3DplqSTcUt6iUBM6mgcdGfzTv4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029