UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'V0ls+YsV3wy+KajHB/CjIdfnWNGxaRAXzHPCHhw6oyM=' 
WHERE 
  key_id = '290b2852e3c2224b843cc89c32db8e11447438d9a6929487d7bd7aa0c3325a9b' 
  AND (
    token = 'V0ls+YsV3wy+KajHB/CjIdfnWNGxaRAXzHPCHhw6oyM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025