UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PnPCkHW47gTbnd/+qwcLfntrz4MKCrsYCXyk+dxug/Q=' 
WHERE 
  key_id = 'fd619716409df1c938c8e974b9715daf53f47af808d3e2238e5db334d37dcab3' 
  AND (
    token = 'PnPCkHW47gTbnd/+qwcLfntrz4MKCrsYCXyk+dxug/Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024