UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ZUBtcMyHmc2k3Ndj+NuzbHSCwu7fMjOWQR20YcFNYq0=' 
WHERE 
  key_id = '9529b103dbc8b49401044122ffeba0dd3c3429a931816cec7b7699da56c05d60' 
  AND (
    token = 'ZUBtcMyHmc2k3Ndj+NuzbHSCwu7fMjOWQR20YcFNYq0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00036