UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'JNo17j+JTJK2Zxs7xOLsuJw4Zbh5Fp4Z7BlkXlz6Ipk=' 
WHERE 
  key_id = 'f67bad27d9600dc57e51563f03649fc704ccb4db6cee0c7bae44743b901c66cc' 
  AND (
    token = 'JNo17j+JTJK2Zxs7xOLsuJw4Zbh5Fp4Z7BlkXlz6Ipk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027