UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Iq2w5urSJTsjReowY2dNF4GmDyPdrj0tKBP4aDY/f98=' 
WHERE 
  key_id = '0f53f7f5cee3fff4ff2dce12058d6185078b94c8e7ac887ddf78c71a2fdd6dac' 
  AND (
    token = 'Iq2w5urSJTsjReowY2dNF4GmDyPdrj0tKBP4aDY/f98=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00275